import requset from './server';
// 下单
export const goodBuy = data => {
  return requset({
    url: '/api/app/good/buy',
    method: 'POST',
    data: data
  })
}

// 我的

// 购买土地
export const appBuy = data => {
  return requset({
    url: '/api/app/buy',
    method: 'POST',
    data: data
  })
}

// 手机号修改密码
export const editPwd = data => {
  return requset({
    url: '/api/app/edit/pwd',
    method: 'POST',
    data: data
  })
}

// 我的订单
export const goodMyCat = data => {
  return requset({
    url: '/api/app/good/my/cat',
    method: 'POST',
    data: data
  })
}

// 实名认证
export const updateAuthentication = data => {
  return requset({
    url: '/api/app/good/update/authentication',
    method: 'POST',
    data: data
  })
}

// 我的团队
export const goodUpdateTeam = data => {
  return requset({
    url: '/api/app/good/update/team',
    method: 'POST',
    data: data
  })
}

// 修改个人资料
export const appUserEdit = data => {
  return requset({
    url: '/api/app/user/edit',
    method: 'POST',
    data: data
  })
}

// 获取用户数据
export const appUserInfo = data => {
  return requset({
    url: '/api/app/user/info',
    method: 'POST',
    data: data
  })
}

// 活动中心

// 获取用户的收的费和茶籽数
export const gameGet = data => {
  return requset({
    url: '/api/app/game/get',
    method: 'POST',
    data: data
  })
}

// 获取今天的卖茶籽的数量
export const gameGoods = data => {
  return requset({
    url: '/api/app/game/goods',
    method: 'POST',
    data: data
  })
}

// 确定付款
export const gameOkPlay = data => {
  return requset({
    url: '/api/app/game/ok/play',
    method: 'POST',
    data: data
  })
}

// 我的购买记录
export const gameOrder = data => {
  return requset({
    url: '/api/app/game/order',
    method: 'POST',
    data: data
  })
}

// 下单
export const gamePlay = data => {
  return requset({
    url: '/api/app/game/play',
    method: 'POST',
    data: data
  })
}

// 我的出售
export const gameSale = data => {
  return requset({
    url: '/api/app/game/sale',
    method: 'POST',
    data: data
  })
}

// 发布出售茶籽
export const gameSell = data => {
  return requset({
    url: '/api/app/game/sell',
    method: 'POST',
    data: data
  })
}

// 确定收款
export const gameShouKuan = data => {
  return requset({
    url: '/api/app/game/shou/kuan',
    method: 'POST',
    data: data
  })
}

// 获取今日油价
export const gameTeaoilGet = data => {
  return requset({
    url: '/api/app/game/teaoil/get',
    method: 'POST',
    data: data
  })
}

// 登录

// 账号密码登录
export const appLogin = data => {
  return requset({
    url: '/api/app/login',
    method: 'POST',
    data: data
  })
}

// 手机号登录接口
export const appLoginMobile = data => {
  return requset({
    url: '/api/app/login/mobile',
    method: 'POST',
    data: data
  })
}

// 退出
export const appLogout = data => {
  return requset({
    url: '/api/app/logout',
    method: 'POST',
    data: data
  })
}

// 发送短信
export const appSendCode = data => {
  return requset({
    url: '/api/app/sendCode',
    method: 'POST',
    data: data
  })
}

// 购物车

// 加入购物车
export const goodAddCat = data => {
  return requset({
    url: '/api/app/good/add/cat',
    method: 'POST',
    data: data
  })
}


// 购物车列表
export const goodCatList = data => {
  return requset({
    url: '/api/app/good/cat/list',
    method: 'POST',
    data: data
  })
}


// 删除购物车
export const goodDeleteCat = data => {
  return requset({
    url: '/api/app/good/delete/cat',
    method: 'POST',
    data: data
  })
}

// 修改购物车
export const goodUpdateCat = data => {
  return requset({
    url: '/api/app/good/update/cat',
    method: 'POST',
    data: data
  })
}

//首页

// 商品详情
export const goodDetail = data => {
  return requset({
    url: '/api/app/good/detail',
    method: 'POST',
    data: data
  })
}

// 首页产品的轮播图和产品信息
export const appIndexList = data => {
  return requset({
    url: '/api/app/index/list',
    method: 'POST',
    data: data
  })
}

// 获取公告
export const noticeDetail = data => {
  return requset({
    url: '/api/app/notice/detail',
    method: 'POST',
    data: data
  })
}

export const signIn = data => {
  return requset({
    url: '/api/app/sign/in',
    method: 'POST',
    data: data
  })
}

// 我的土地

export const gameUserLandGet = data => {
  return requset({
    url: '/api/app/game/user/land/get',
    method: 'POST',
    data: data
  })
}

// 历史土地

export const gameUserHisLandGet = data => {
  return requset({
    url: '/api/app/game/user/history/land/get',
    method: 'POST',
    data: data
  })
}


// 用户地址

// 获取默认地址
export const appDefault = data => {
  return requset({
    url: '/api/app/address/default',
    method: 'POST',
    data: data
  })
}

// 设置默认地址
export const appDefaultSet = data => {
  return requset({
    url: '/api/app/address/default/set',
    method: 'POST',
    data: data
  })
}

// 删除用户地址
export const appDel = data => {
  return requset({
    url: '/api/app/address/del',
    method: 'POST',
    data: data
  })
}

// 获取单个地址
export const appDetailId = data => {
  return requset({
    url: `/api/app/address/detail/${data}`,
    method: 'POST',
    data: data
  })
}

// 新增用户地址
export const appEdit = data => {
  return requset({
    url: `/api/app/address/update`,
    method: 'POST',
    data: data
  })
}

// 新增用户地址
export const appAdd = data => {
  return requset({
    url: `/api/app/address/edit`,
    method: 'POST',
    data: data
  })
}

// 新增用户地址
export const appList = data => {
  return requset({
    url: `/api/app/address/list`,
    method: 'POST',
    data: data
  })
}

// 个人邀请码
export const QRcode = data => {
  return requset({
    url: `/api/app/create/qr/code`,
    method: 'POST',
    data: data
  })
}

export const landList = data => {
  return requset({
    url: `/api/app/land/list`,
    method: 'POST',
    data: data
  })
}
export const landListBuy = data => {
  return requset({
    url: `/api/app/buy`,
    method: 'POST',
    data: data
  })
}

export const orderDelete = data => {
  return requset({
    url: `/api/app/order/delete`,
    method: 'POST',
    data: data
  })
}

export const orderUpdate = data => {
  return requset({
    url: `/api/app/order/update`,
    method: 'POST',
    data: data
  })
}

export const runWatter = data => {
  return requset({
    url: `/api/app/run/watter`,
    method: 'POST',
    data: data
  })
}

// 提示价格区间
export const sellMoney = data => {
  return requset({
    url: `/api/app/game/sell/money`,
    method: 'POST',
    data: data
  })
}

export const deletSsell = data => {
  return requset({
    url: `/api/app/game/delete/sell`,
    method: 'POST',
    data: data
  })
}
